<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="eg" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VOC 배분정보</title>
<LINK href="/monitor/css/basic.css" rel="stylesheet" type="text/css">
<script src="/monitor/jquery-ui-1.10.1.custom/js/jquery-1.9.1.js" type="text/javascript" ></script>
<script src="/monitor/js/basic.js" type="text/javascript" ></script>
</head>
<body>
<c:if test="${!empty param.PARAM_ID_VOC}">
   <c:set var="where1" value="AND ID_VOC = '${param.PARAM_ID_VOC}'" />			
</c:if>
<c:if test="${!empty param.PARAM_ID_VOC}">
   <c:set var="where2" value="AND SEQ_VOC_REQ IN (SELECT SEQ_VOC_REQ FROM TBS_VOC_REQUEST WHERE ID_VOC = '${param.PARAM_ID_VOC}')" />			
</c:if>
<sql:query var='test' dataSource="basisDataSource">
	SELECT * 
	 FROM TBS_VOC_DIST
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where1}
 </sql:query>	
 <sql:query var='test2' dataSource="basisDataSource">
	SELECT * 
	 FROM TBS_VOC_DIST_CONT
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where1}
 </sql:query>	
  <sql:query var='test3' dataSource="basisDataSource">
	SELECT * 
	 FROM TBS_VOC_REQUEST
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where1}
 </sql:query>	
  <sql:query var='test4' dataSource="basisDataSource">
	SELECT * 
	 FROM TBS_VOC_REQUEST_TGT
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where2}
 </sql:query>	 
<h3>VOC 배분정보</h3>
 <form method="post">
	<table>
		<tr>
			<td>ID_VOC</td>
			<td><input name="PARAM_ID_VOC" value="${param.PARAM_ID_VOC}"></td>
		</tr>
	</table>
	<input type="submit" />
</form>
<br/>
<h3>TBS_VOC_DIST</h3>
<table border="1">
	<tr>
			<td class="header">ID_VOC</td>
			<td class="header">ID_SUB_VOC</td>
			<td class="header">DT_VOC_DIST</td>
			<td class="header">ID_VOC_DIST_DEPT</td>
			<td class="header">ID_VOC_DIST_EMP</td>
			<td class="header">DT_VOC_ASN</td>
			<td class="header">ID_VOC_ASN_DEPT</td>
			<td class="header">ID_VOC_ASN_EMP</td>
			<td class="header">DT_VOC_ACT_CFM</td>
			<td class="header">DT_VOC_ACT_PLAN</td>
			<td class="header">DT_VOC_ACT</td>
			<td class="header">ID_VOC_ACT_DEPT</td>
			<td class="header">ID_VOC_ACT_EMP</td>
			<td class="header">DT_VOC_END</td>
			<td class="header">FG_REPLY_PHONE</td>
			<td class="header">FG_REPLY_EMAIL</td>
			<td class="header">FG_REPLY_SMS</td>
			<td class="header">FG_REPLY_LETTER</td>
			<td class="header">CD_VOC_CMPT</td>
			<td class="header">ID_CUST</td>
			<td class="header">SEQ_VOC_REL_TRAN</td>
			<td class="header">CD_PROD</td>
			<td class="header">DS_TITLE</td>
			<td class="header">CD_VOC_STEP</td>
			<td class="header">CD_VOC_STATUS</td>
			<td class="header">FG_VOC_MAIN</td>
			<td class="header">FG_VOC_RECYCLE</td>
			<td class="header">FG_URGENCY</td>
			<td class="header">FG_VOC_EXCLUSION</td>
			<td class="header">FG_DEL</td>
			<td class="header">DT_REG</td>
			<td class="header">TAT</td>
			<td class="header">ID_REG_DEPT</td>
			<td class="header">ID_REG_EMP</td>
			<td class="header">DT_UPT</td>
			<td class="header">ID_UPT_DEPT</td>
			<td class="header">ID_UPT_EMP</td>
		</tr>
	<tr>
			<td class="header">VOC번호</td>
			<td class="header">VOC서브번호</td>
			<td class="header">배분확정일시</td>
			<td class="header">배분확정부서</td>
			<td class="header">배분확정자</td>
			<td class="header">배정일시</td>
			<td class="header">배정부서</td>
			<td class="header">배정자</td>
			<td class="header">처리확정일시</td>
			<td class="header">처리예정일시</td>
			<td class="header">처리일시</td>
			<td class="header">처리부서</td>
			<td class="header">처리자</td>
			<td class="header">종결일시</td>
			<td class="header">회신여부_전화</td>
			<td class="header">회신여부_이메일</td>
			<td class="header">회신여부_문자</td>
			<td class="header">회신여부_서신</td>
			<td class="header">처리완료유형코드</td>
			<td class="header">고객번호</td>
			<td class="header">관련거래일련번호</td>
			<td class="header">제품코드</td>
			<td class="header">제목</td>
			<td class="header">진행단계</td>
			<td class="header">진행상태</td>
			<td class="header">VOC대표여부</td>
			<td class="header">VOC재처리여부</td>
			<td class="header">긴급여부</td>
			<td class="header">제외여부</td>
			<td class="header">삭제여부</td>
			<td class="header">최초등록일시</td>
			<td class="header">T.A.T</td>
			<td class="header">최초등록부서</td>
			<td class="header">최초등록자</td>
			<td class="header">최초수정일시</td>
			<td class="header">최초수정부서</td>
			<td class="header">최초수정자</td>
		</tr>
	<c:forEach var="row" items="${test.rows}">
	<tr onclick="setLineBGColor(this)">
			<td>${row.ID_VOC}</td>
			<td>${row.ID_SUB_VOC}</td>
			<td>${row.DT_VOC_DIST}</td>
			<td>${row.ID_VOC_DIST_DEPT}</td>
			<td>${row.ID_VOC_DIST_EMP}</td>
			<td>${row.DT_VOC_ASN}</td>
			<td>${row.ID_VOC_ASN_DEPT}</td>
			<td>${row.ID_VOC_ASN_EMP}</td>
			<td>${row.DT_VOC_ACT_CFM}</td>
			<td>${row.DT_VOC_ACT_PLAN}</td>
			<td>${row.DT_VOC_ACT}</td>
			<td>${row.ID_VOC_ACT_DEPT}</td>
			<td>${row.ID_VOC_ACT_EMP}</td>
			<td>${row.DT_VOC_END}</td>
			<td>${row.FG_REPLY_PHONE}</td>
			<td>${row.FG_REPLY_EMAIL}</td>
			<td>${row.FG_REPLY_SMS}</td>
			<td>${row.FG_REPLY_LETTER}</td>
			<td>${row.CD_VOC_CMPT}</td>
			<td>${row.ID_CUST}</td>
			<td>${row.SEQ_VOC_REL_TRAN}</td>
			<td>${row.CD_PROD}</td>
			<td>${row.DS_TITLE}</td>
			<td>${row.CD_VOC_STEP}</td>
			<td>${row.CD_VOC_STATUS}</td>
			<td>${row.FG_VOC_MAIN}</td>
			<td>${row.FG_VOC_RECYCLE}</td>
			<td>${row.FG_URGENCY}</td>
			<td>${row.FG_VOC_EXCLUSION}</td>
			<td>${row.FG_DEL}</td>
			<td>${row.DT_REG}</td>
			<td>${row.TAT}</td>
			<td>${row.ID_REG_DEPT}</td>
			<td>${row.ID_REG_EMP}</td>
			<td>${row.DT_UPT}</td>
			<td>${row.ID_UPT_DEPT}</td>
			<td>${row.ID_UPT_EMP}</td>
		</tr>
	</c:forEach>
</table>

<h3>TBS_VOC_DIST_CONT</h3>
<table border="1">
	<tr>
			<td class="header">SEQ_VOC_DIST_CONT</td>
			<td class="header">ID_VOC</td>
			<td class="header">ID_SUB_VOC</td>
			<td class="header">TP_CONT</td>
			<td class="header">DS_CONT</td>
			<td class="header">DT_REG</td>
			<td class="header">ID_REG_DEPT</td>
			<td class="header">ID_REG_EMP</td>
			<td class="header">DT_UPT</td>
			<td class="header">ID_UPT_DEPT</td>
			<td class="header">ID_UPT_EMP</td>
		</tr>
	<tr>
			<td class="header">VOC내용일련번호</td>
			<td class="header">VOC번호</td>
			<td class="header">VOC서브번호</td>
			<td class="header">내용구분(03:답변내용,04:처리내용)</td>
			<td class="header">VOC내용</td>
			<td class="header">최초등록일시</td>
			<td class="header">최초등록부서</td>
			<td class="header">최초등록자</td>
			<td class="header">최초수정일시</td>
			<td class="header">최초수정부서</td>
			<td class="header">최초수정자</td>
		</tr>
	<c:forEach var="row" items="${test2.rows}">
	<tr onclick="setLineBGColor(this)">
			<td>${row.SEQ_VOC_DIST_CONT}</td>
			<td>${row.ID_VOC}</td>
			<td>${row.ID_SUB_VOC}</td>
			<td>${row.TP_CONT}</td>
			<eg:to-string var="textValue" value="${row.DS_CONT}"/>
			<td><c:out value="${textValue}"/></td>
			<td>${row.DT_REG}</td>
			<td>${row.ID_REG_DEPT}</td>
			<td>${row.ID_REG_EMP}</td>
			<td>${row.DT_UPT}</td>
			<td>${row.ID_UPT_DEPT}</td>
			<td>${row.ID_UPT_EMP}</td>
		</tr>
	</c:forEach>
</table>

<h3>TBS_VOC_REQUEST</h3>
<table border="1">
	<tr>
			<td class="header">SEQ_VOC_REQ</td>
			<td class="header">ID_VOC</td>
			<td class="header">ID_SUB_VOC</td>
			<td class="header">TP_REQ</td>
			<td class="header">CD_REQ_REASON</td>
			<td class="header">DS_REQ_TITLE</td>
			<td class="header">DS_REQ_CONT</td>
			<td class="header">DT_REQ</td>
			<td class="header">ID_REQ_DEPT</td>
			<td class="header">ID_REQ_EMP</td>
			<td class="header">CD_REQ_STATUS</td>
			<td class="header">DT_ACT_PLAN</td>
			<td class="header">DT_REG</td>
			<td class="header">ID_REG_DEPT</td>
			<td class="header">ID_REG_EMP</td>
			<td class="header">DT_UPT</td>
			<td class="header">ID_UPT_DEPT</td>
			<td class="header">ID_UPT_EMP</td>
		</tr>
	<tr>
			<td class="header">요청관리번호</td>
			<td class="header">VOC번호</td>
			<td class="header">VOC서브번호</td>
			<td class="header">요청구분</td>
			<td class="header">요청사유코드</td>
			<td class="header">요청제목</td>
			<td class="header">요청내용</td>
			<td class="header">요청일시</td>
			<td class="header">요청부서</td>
			<td class="header">요청자</td>
			<td class="header">요청상태</td>
			<td class="header">처리예정일</td>
			<td class="header">최초등록일시</td>
			<td class="header">최초등록부서</td>
			<td class="header">최초등록자</td>
			<td class="header">최초수정일시</td>
			<td class="header">최초수정부서</td>
			<td class="header">최초수정자</td>
		</tr>
	<c:forEach var="row" items="${test3.rows}">
	<tr onclick="setLineBGColor(this)">
			<td>${row.SEQ_VOC_REQ}</td>
			<td>${row.ID_VOC}</td>
			<td>${row.ID_SUB_VOC}</td>
			<td>${row.TP_REQ}</td>
			<td>${row.CD_REQ_REASON}</td>
			<td>${row.DS_REQ_TITLE}</td>
			<td>${row.DS_REQ_CONT}</td>
			<td>${row.DT_REQ}</td>
			<td>${row.ID_REQ_DEPT}</td>
			<td>${row.ID_REQ_EMP}</td>
			<td>${row.CD_REQ_STATUS}</td>
			<td>${row.DT_ACT_PLAN}</td>
			<td>${row.DT_REG}</td>
			<td>${row.ID_REG_DEPT}</td>
			<td>${row.ID_REG_EMP}</td>
			<td>${row.DT_UPT}</td>
			<td>${row.ID_UPT_DEPT}</td>
			<td>${row.ID_UPT_EMP}</td>
		</tr>
	</c:forEach>
</table>

<h3>TBS_VOC_REQUEST_TGT</h3>
<table border="1">
	<tr>
			<td class="header">SEQ_VOC_REQ_TGT</td>
			<td class="header">SEQ_VOC_REQ</td>
			<td class="header">DT_ACT</td>
			<td class="header">ID_ACT_DEPT</td>
			<td class="header">ID_ACT_EMP</td>
			<td class="header">DS_ACT_CONT</td>
			<td class="header">TP_ACT</td>
			<td class="header">CD_ACT_STATUS</td>
			<td class="header">DT_REG</td>
			<td class="header">ID_REG_DEPT</td>
			<td class="header">ID_REG_EMP</td>
			<td class="header">DT_UPT</td>
			<td class="header">ID_UPT_DEPT</td>
			<td class="header">ID_UPT_EMP</td>
		</tr>
	<tr>
			<td class="header">요청대상관리번호</td>
			<td class="header">요청관리번호</td>
			<td class="header">처리일시</td>
			<td class="header">처리부서</td>
			<td class="header">처리자</td>
			<td class="header">처리내용</td>
			<td class="header">처리유형</td>
			<td class="header">처리상태</td>
			<td class="header">최초등록일시</td>
			<td class="header">최초등록부서</td>
			<td class="header">최초등록자</td>
			<td class="header">최초수정일시</td>
			<td class="header">최초수정부서</td>
			<td class="header">최초수정자</td>
		</tr>
	<c:forEach var="row" items="${test4.rows}">
	<tr onclick="setLineBGColor(this)">
			<td>${row.SEQ_VOC_REQ_TGT}</td>
			<td>${row.SEQ_VOC_REQ}</td>
			<td>${row.DT_ACT}</td>
			<td>${row.ID_ACT_DEPT}</td>
			<td>${row.ID_ACT_EMP}</td>
			<td>${row.DS_ACT_CONT}</td>
			<td>${row.TP_ACT}</td>
			<td>${row.CD_ACT_STATUS}</td>
			<td>${row.DT_REG}</td>
			<td>${row.ID_REG_DEPT}</td>
			<td>${row.ID_REG_EMP}</td>
			<td>${row.DT_UPT}</td>
			<td>${row.ID_UPT_DEPT}</td>
			<td>${row.ID_UPT_EMP}</td>
		</tr>
	</c:forEach>
</table>
</body>
</html> 